from django.urls import path
from django.conf.urls import url
from django.conf.urls import include
from my_admin import views

urlpatterns = [
    url('^$', views.index, name='table_index'),
    path('test/', views.test),
    url('(?P<app_name>\w+)/(?P<table_name>\w+)$', views.table_detail, name='table_detail'),    # 显示表详细
    url(r'(?P<app_name>\w+)/(?P<table_name>\w+)/(?P<nid>\d+)/change/$', views.obj_change, name='obj_change'),  # 修改页
    url(r'(?P<app_name>\w+)/(?P<table_name>\w+)/(?P<nid>\d+)/delete/$', views.delete_confirm, name='delete_confirm'),  # 删除页
    url(r'(?P<app_name>\w+)/(?P<table_name>\w+)/(?P<nid>\d+)/password/$', views.password_reset, name='password_reset'),  # 密码修改页
    url(r'(?P<app_name>\w+)/(?P<table_name>\w+)/doDelete/$', views.do_delete, name='do_delete'),    #执行删除操作
    url(r'(?P<app_name>\w+)/(?P<table_name>\w+)/add/$', views.obj_add, name='obj_add'),  # 添加页
]
